package com.lzj.controller;

import com.lzj.model.Orders;
import com.lzj.service.OrdersService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单控制器
 *
 * @author 李泽伟
 * @date 2024/02/21
 */
@RestController
@RequestMapping("order")
@RequiredArgsConstructor
public class OrderController {

    private final OrdersService ordersService;
    @PostMapping("addOne")
    public String addOne(Orders orders) {
        ordersService.save(orders);
        return "ok";
    }

}
